package com.spic.system.api;

import com.spic.common.core.constant.ServiceNameConstants;
import com.spic.common.core.domain.R;
import com.spic.system.api.domain.BusinessStatus;
import com.spic.system.api.factory.RemoteStatusFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(contextId = "remoteStatus", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteStatusFallbackFactory.class)
public interface RemoteStatus {

    @GetMapping("/status/list/selectStateBybusinessType")
    public R<List<BusinessStatus>> getStateBybusinessType(@RequestParam("businessType") String businessType);

    @PostMapping("/status/list/selectStateByTypeAndKeys/{businessType}")
    public R<List<BusinessStatus>> getStateBybusinessIds(@PathVariable("businessType") String businessType, @RequestBody List<String> keys);

    /**
     * 根据流程实例id获取流程任务当前节点key信息列表
     */
    @PostMapping("/task/getTaskInfoList")
    public R<List<String>> getTaskInfoList(@RequestBody List<String> list);
}

